// enum Direction {
//   Up,
//   Down,
//   Left,
//   Right
// }

// enum Direction {
//   Up = 2,
//   Down = 4,
//   Left = 8,
//   Right = 16
// }

enum Direction {
  Up = 'Up',
  Down = 'Down',
  Left = 'Left',
  Right = 'Right'
}

function changeDirection(direction: Direction) {
  switch (direction) {
    case Direction.Up:
      console.log('向上')
      break
    case Direction.Down:
      console.log('向下')
      break
    case Direction.Left:
      console.log('向左')
      break
    case Direction.Right:
      console.log('向右')
     break
  }
}

changeDirection(Direction.Up)